﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using ZhimeiSoft.CharmManager.Interface;
using ZhimeiSoft.CharmManager.Server.Proxy.Impl;
using ZhimeiSoft.CharmManager.DOL;

namespace ZhimeiSoft.CharmManager.Client.Proxy.Local
{
    public class LocalBusinessProxy : IBusinessService
    {
        
        #region 员工信息

        public bool InsertEmployee(DBEntityEmployee employee, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.InsertEmployee(employee, out error);
        }

        public bool UpdateEmployee(DBEntityEmployee employee, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.UpdateEmployee(employee, out error);
        }

        public bool DeleteEmployee(int employeeid, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.DeleteEmployee(employeeid, out error);
        }

        public bool QueryEmployeeState(string state, out DataSet dsEmployeeData, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryEmployeeState(state, out dsEmployeeData, out error);
        }

        /// <summary>
        /// 根据条件过滤员工信息
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        public bool QeuryEmployeeFilter(string filter, out DataSet dsEmployee, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QeuryEmployeeFilter(filter, out dsEmployee, out error);
        }
        #endregion

        #region 员工休假


        public bool InsertEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.InsertEmployeeVacation(employeeVacation, out error);
        }

        public bool DelEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.DelEmployeeVacation(employeeVacation, out error);
        }

        public bool UpdateEmployeeVacation(DBEntityEmoloyeeVacation employeeVacation_old, DBEntityEmoloyeeVacation employeeVacation_new, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.UpdateEmployeeVacation(employeeVacation_old, employeeVacation_new, out error);
        }

        public bool QueryEmployeeVacationDateTime(string startDate, string endDate, out DataSet dsEmployeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.QueryEmployeeVacationDateTime(startDate, endDate, out dsEmployeeVacation, out error);
        }

        public bool QueryEmployeeVacationEmployeeID(int employeeID, string startDate, string endDate, out DataSet dsEmployeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.QueryEmployeeVacationEmployeeID(employeeID, startDate, endDate, out dsEmployeeVacation, out error);
        }

        /// <summary>
        /// 根据当天返回休假中的员工
        /// </summary>
        /// <param name="vacationDate">当前日期</param>
        /// <param name="state">休假状态</param>
        /// <param name="dsEmployeeVacation">返回数据集</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool QueryEmployeeVacationDay(string vacationDate, string state, out DataSet dsEmployeeVacation, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.QueryEmployeeVacationDay(vacationDate, state, out dsEmployeeVacation, out error);
        }

        #endregion

        #region 店信息


        public bool QuerySalonInfo(out System.Data.DataSet dsSalonInfo, out string error)
        {
            WSBusinessServerProxyImpl impl = new WSBusinessServerProxyImpl();
            return impl.QuerySalonInfo(out dsSalonInfo, out error);
        }

        #endregion

        #region 客户信息

        /// <summary>
        /// 添加客户信息
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>
        public bool InsertCustomer(DBEntityCustomInfo customer, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertCustomer(customer, out error);
        }

        /// <summary>
        /// 修改客户信息
        /// </summary>
        /// <param name="customer"></param>
        public bool UpdateCustomer(DBEntityCustomInfo customer, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateCustomer(customer, out error);
        }

        /// <summary>
        /// 删除客户信息
        /// </summary>
        /// <param name="customerID"></param>
        public bool DeleteCustomer(int customerID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteCustomer(customerID, out error);
        }
        /// <summary>
        /// 根据用户状态获取用户信息
        /// </summary>
        /// <param name="stateStr">用户状态</param>
        /// <param name="dsCustomInfo">返回用户信息</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool QueryCustomState(string stateStr, out DataSet dsCustomInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomState(stateStr, out dsCustomInfo, out error);
        }
        /// <summary>
        /// 根据用户ID获取数据
        /// </summary>
        /// <param name="customerID">用户ID</param>
        /// <param name="dsCustomInfo">返回数据</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool QueryCustomerID(int customerID, out DataSet dsCustomInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomerID(customerID, out dsCustomInfo, out error);
        }
        /// <summary>
        /// 根据会员姓名查询信息
        /// </summary>
        /// <param name="customName"></param>
        /// <returns></returns>
        public bool QueryCustomName(string customName, out DataSet dsCustomInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomName(customName, out dsCustomInfo, out error);
        }
        #endregion

        #region 预约信息

        /// <summary>
        /// 插入预约记录
        /// </summary>
        /// <param name="scheduleInfo">信息类</param>
        public bool InsertScheduleCustom(DBEntitySchedule scheduleInfo, DBEntityScheduleCustom scheduleCustom, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertScheduleCustom(scheduleInfo, scheduleCustom, out error);
        }
        /// <summary>
        /// 删除一条预约记录
        /// </summary>
        /// <param name="scheduleInfo">信息类</param>
        public bool DeleteScheduleCustom(DBEntitySchedule scheduleInfo, DBEntityScheduleCustom scheduleCustom, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteScheduleCustom(scheduleInfo, scheduleCustom, out error);
        }
        /// <summary>
        /// 更新一条预约记录
        /// </summary>
        /// <param name="scheduleInfo">信息类</param>
        public bool UpdateScheduleCustom(DBEntitySchedule scheduleInfo, DBEntityScheduleCustom scheduleCustomOld,
            DBEntityScheduleCustom scheduleCustomNew, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateScheduleCustom(scheduleInfo, scheduleCustomOld, scheduleCustomNew, out error);
        }
        /// <summary>
        /// 按照预约状态获取记录
        /// </summary>
        /// <param name="scheduleState">预约状态</param>
        /// <returns>返回数据</returns>
        public bool QueryScheduleState(string scheduleState, out DataSet dsSchedule, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryScheduleState(scheduleState, out dsSchedule, out error);
        }
        /// <summary>
        /// 根据用户ID获取提醒信息
        /// </summary>
        /// <param name="customerID">用户ID</param>
        /// <param name="scheduleState">提醒状态</param>
        /// <returns></returns>
        public bool QueryScheduleCustomID(int customerID, string scheduleState, out DataSet dsSchedule, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryScheduleCustomID(customerID, scheduleState, out dsSchedule, out error);
        }
        /// <summary>
        /// 根据用户ID以及当前时间查询提醒信息.
        /// </summary>
        /// <param name="customerID">用户ID</param>
        /// <param name="currTime">当前时间</param>
        /// <param name="dsSchedule">提醒数据集</param>
        /// <param name="error">错误信息</param>
        /// <returns>返回是否成功</returns>
        public bool QueryScheduleCustomDateTime(int customerID, DateTime currTime, out DataSet dsSchedule, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryScheduleCustomDateTime(customerID, currTime, out dsSchedule, out error);
        }

        /// <summary>
        /// 根据月份查询预约记录
        /// </summary>
        /// <param name="queryYear">查询年</param>
        /// <param name="queryMonth">查询月</param>
        /// <returns></returns>
        public bool QueryScheduleMonth(int queryYear, int queryMonth, out DataSet dsSchedule, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryScheduleMonth(queryYear, queryMonth, out dsSchedule, out error);
        }

        /// <summary>
        /// 根据日查询预约记录
        /// </summary>
        /// <param name="queryYear">年</param>
        /// <param name="queryMonth">月</param>
        /// <param name="queryDay">日</param>
        /// <returns></returns>
        public bool QueryScheduleDay(int queryYear, int queryMonth, int queryDay, out DataSet dsSchedule, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryScheduleDay(queryYear, queryMonth, queryDay, out dsSchedule, out error);
        }
        #endregion

        #region 新预约管理
        /// <summary>
        /// 增加预约信息
        /// </summary>
        public bool AddResveration(DBEntityReservation reservationInfo, DataSet dsReservationServiceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.AddResveration(reservationInfo, dsReservationServiceItem, out error);
        }
        /// <summary>
        /// 根据信息查询预约ＩＤ
        /// </summary>
        /// <param name="reservatioinInfo"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public bool QueryResverationID(DBEntityReservation reservationInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryResverationID(reservationInfo, out error);
        }
        /// <summary>
        /// 修改预约信息
        /// </summary>
        /// <param name="reservatioinInfo"></param>
        /// <param name="dsReservationServiceItem"></param>
        public bool UpdateReservation(DBEntityReservation reservationInfo, DataSet dsReservationServiceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateReservation(reservationInfo, dsReservationServiceItem, out error);
        }
        /// <summary>
        /// 根据年月查询预约信息
        /// </summary>
        /// <param name="queryYear">年</param>
        /// <param name="queryMonth">月</param>
        /// <param name="dsReservation">预约信息</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool QueryReservationMonth(int queryYear, int queryMonth, string state, out DataSet dsReservation, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationMonth(queryYear, queryMonth, state, out dsReservation, out error);
        }
        /// <summary>
        /// 获取预约信息
        /// </summary>
        /// <param name="queryYear">查询年</param>
        /// <param name="queryMonth">查询月</param>
        /// <param name="queryDay">查询日</param>
        /// <param name="stateStr">预约状态</param>
        /// <returns></returns>
        public bool QueryResveration(int queryYear, int queryMonth, int queryDay, string stateStr, out DataSet dsReservation, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryResveration(queryYear, queryMonth, queryDay, stateStr, out dsReservation, out error);
        }
                /// <summary>
        /// 获取员工预约信息
        /// </summary>
        /// <param name="queryYear">查询年</param>
        /// <param name="queryMonth">查询月</param>
        /// <param name="queryDay">查询日</param>
        /// <param name="employeeID">员工ID</param>
        /// <param name="stateStr">预约状态</param>
        /// <returns></returns>
        public bool QueryReservationEmployee(int queryYear, int queryMonth, int queryDay, int employeeID, string stateStr, out DataSet dsReservationEmployee, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationEmployee(queryYear, queryMonth, queryDay, employeeID, stateStr, out dsReservationEmployee, out error);
        }
        /// <summary>
        /// 根据时间和会员查询预约
        /// </summary>
        /// <param name="querYear">年</param>
        /// <param name="queryMonth">月</param>
        /// <param name="queryDay">日</param>
        /// <param name="customID">会员ID</param>
        /// <param name="dsReservation">返回查询结果</param>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool QueryReservationCustom(int queryYear, int queryMonth, int queryDay, int customID, out DataSet dsReservation, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationCustom(queryYear, queryMonth, queryDay, customID, out dsReservation, out error);
        }
        /// <summary>
        /// 根据预约ID查询对应的服务项目
        /// </summary>
        /// <param name="reservationID"></param>
        /// <returns></returns>
        public bool QueryReservationServiceItem(int reservationID, out DataSet dsReservationServiceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationServiceItem(reservationID, out dsReservationServiceItem, out error);
        }
        /// <summary>
        /// 计算下一次的预约时间
        /// </summary>
        /// <param name="customerServiceItemID">预约的项目ID</param>
        /// <param name="iday">返回下一次的预约天数</param>
        public bool ComputerNextReservation(int customerServiceItemID, out int iday, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.ComputerNextReservation(customerServiceItemID, out iday, out error);
        }

        /// <summary>
        /// 根据主表的状态获取明细数据
        /// </summary>
        /// <param name="state"></param>
        /// <returns></returns>
        public bool QueryReservationServiceItemForReservationState(string state, out DataSet dsReservationServiceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationServiceItemForReservationState(state, out dsReservationServiceItem, out error);
        }

        /// <summary>
        /// 查询会员卡项预约情况
        /// </summary>
        /// <param name="customID">会员ID</param>
        /// <param name="customServiceItemID">会员服务项目ID</param>
        /// <returns></returns>
        public bool QeuryReservationCustomServiceItem(int customID, int customServiceItemID, out DataSet dsReservation, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QeuryReservationCustomServiceItem(customID, customServiceItemID, out dsReservation, out error);
        }

        /// <summary>
        /// 查询会员卡预约情况
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        public bool QueryReservationCustomServiceItemFilter(string filter, out DataSet dsCustomServiceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationCustomServiceItemFilter(filter, out dsCustomServiceItem, out error);
        }

        /// <summary>
        /// 根据预约ID查询详细项目
        /// </summary>
        /// <param name="reservationID">预约ＩＤ</param>
        /// <returns></returns>
        public bool QueryReservationServiceItemDetail(int reservationID, out DataSet dsReservationServiceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationServiceItemDetail(reservationID, out dsReservationServiceItem, out error);
        }

        /// <summary>
        /// 预约项目调整
        /// </summary>
        /// <param name="ajdustReservationID">当前调整的预约项目ID</param>
        /// <param name="adjustDateTime">预约调整后的时间</param>
        /// <param name="customServiceItemID">要调整的时间</param>
        /// <param name="customID">会员</param>
        public bool AdjustReservationCustomServiceItem(int reservationID, DateTime adjustDateTime, int customServiceItemID, int customID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.AdjustReservationCustomServiceItem(reservationID, adjustDateTime, customServiceItemID, customID, out error);
        }

        /// <summary>
        /// 预约调整
        /// </summary>
        /// <param name="entityReservation"></param>
        public bool AdjustReservation(DBEntityReservation entityReservation, int reservationEmployeeID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.AdjustReservation(entityReservation, reservationEmployeeID, out error);
        }

        /// <summary>
        /// 调整预约时间
        /// </summary>
        /// <param name="reservationID"></param>
        public bool AdjstReservationCurrTime(DBEntityReservation reservationInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.AdjstReservationCurrTime(reservationInfo, out error);
        }

        /// <summary>
        /// 更新预约状态
        /// </summary>
        /// <param name="reservationID"></param>
        /// <param name="customServiceItemID"></param>
        /// <param name="state"></param>
        public bool UpdateReservationCustomServiceItemState(int reservationID, int customServiceItemID, int employeeID, string state, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateReservationCustomServiceItemState(reservationID, customServiceItemID, employeeID, state, out error);
        }

        /// <summary>
        /// 更新过期的预约状态
        /// </summary>
        /// <param name="error">错误信息</param>
        /// <returns></returns>
        public bool CheckAllReservationState(out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.CheckAllReservationState(out error);
        }
        /// <summary>
        /// 刷新预约项目的提示
        /// </summary>
        /// <param name="reservationInfo"></param>
        public bool refershReservationToDoList(DBEntityReservation reservationInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.refershReservationToDoList(reservationInfo, out error);
        }

        /// <summary>
        /// 查询会员预约情况
        /// </summary>
        /// <param name="customID">会员ID</param>
        /// <param name="queryYear">查询年</param>
        /// <param name="queryMonth">查询月</param>
        /// <returns></returns>
        public bool QueryCustomReservation(int customID, int queryYear, int queryMonth, out DataSet dsReservationCustomInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomReservation(customID, queryYear, queryMonth, out dsReservationCustomInfo, out error);
        }
        #endregion

        #region 服务项目管理

        #region 服务项目分类
        public bool InsertServiceItemCategory(DBEntityServiceItemCategory category, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertServiceItemCategory(category, out error);
        }

        public bool UpdateServiceItemCategory(DBEntityServiceItemCategory category, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateServiceItemCategory(category, out error);
        }

        public bool DeleteServiceItemCategory(int categoryid, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteServiceItemCategory(categoryid, out error);
        }

        public bool QueryServiceItemCategory(string sFilter, out DataSet dsCategory, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryServiceItemCategory(sFilter, out dsCategory, out error);
        }
        #endregion

        #region 服务项目
        public bool InsertServiceItem(DBEntityServiceItem serviceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertServiceItem(serviceItem, out error);
        }

        public bool UpdateServiceItem(DBEntityServiceItem serviceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateServiceItem(serviceItem, out error);
        }

        public bool SetServiceItemState(int serviceItemID, string sState, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.SetServiceItemState(serviceItemID, sState, out error);
        }

        public bool QueryServiceItem(string sFilter, out DataSet dsServiceItem, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryServiceItem(sFilter, out dsServiceItem, out error);
        }
        #endregion

        #region 服务项目明细
        public bool QueryServiceItemDetail(int iServiceItemID, out DataSet ds, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryServiceItemDetail(iServiceItemID, out ds, out error);
        }

        public bool SubmitServiceItmeDetail(DataSet ds, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.SubmitServiceItmeDetail(ds, out error);
        }

        public bool DeleteServiceItemDetail(int iServiceItemID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteServiceItemDetail(iServiceItemID, out error);
        }

        public bool InsertServiceItemDetail(DBEntityServiceItemDetail entity, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertServiceItemDetail(entity, out error);
        }

        public bool UpdateServiceItemDetail(DBEntityServiceItemDetail entity, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateServiceItemDetail(entity, out error);
        }

        public bool DeleteServiceItemDetailById(int detailID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteServiceItemDetailById(detailID, out error);
        }
        #endregion

        #endregion

        #region 代办事项
        /// <summary>
        /// 插入一个代办事项
        /// </summary>
        /// <param name="todoListInfo">信息类</param>
        public bool InsertToDoList(DBEntityToDoList todoListInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertToDoList(todoListInfo, out error);
        }
        /// <summary>
        /// 插入一个待办事项，并且和预约关联
        /// </summary>
        /// <param name="todoListInfo"></param>
        /// <param name="reservationToDoListInfo"></param>
        public bool InsertResverationToDoList(DBEntityToDoList todoListInfo, DBEntityReservationToDoList reservationToDoListInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertResverationToDoList(todoListInfo, reservationToDoListInfo, out error);
        }
        /// <summary>
        /// 修改一个代办事项
        /// </summary>
        /// <param name="todoListInfo">代办事项</param>
        public bool UpdateToDoList(DBEntityToDoList todoListInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateToDoList(todoListInfo, out error);
        }
        /// <summary>
        /// 删除一个代办事项
        /// </summary>
        /// <param name="todoListID">待办事项ＩＤ</param>
        public bool DeleteToDoList(int todoListID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteToDoList(todoListID, out error);
        }
        /// <summary>
        /// 删除预约与待办事项对应表
        /// </summary>
        /// <param name="reservationToDoListInfo"></param>
        public bool DeleteResverationToDoList(DBEntityReservationToDoList reservationToDoListInfo, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteResverationToDoList(reservationToDoListInfo, out error);
        }
         /// <summary>
        /// 根据时间状态获取代办事项
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public bool GetStateToDoList(DateTime startDate, string state, out DataSet dsToDoList, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.GetStateToDoList(startDate, state, out dsToDoList, out error);
        } 

        public bool QueryTodoList(string sFilter, out DataSet dsTodoList, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryTodoList(sFilter, out dsTodoList, out error);
        }

        public bool MarkTodoListCompleted(int todoListID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.MarkTodoListCompleted(todoListID, out error);
        }

        public bool CheckAllExpiredTodoState(out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.CheckAllExpiredTodoState(out error);
        }

         /// <summary>
        /// 根据todolistID查询预约
        /// </summary>
        /// <param name="todoListID"></param>
        /// <returns></returns>
        public bool QueryReservationForToDoListID(int todoListID, out DataSet dsReservation, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryReservationForToDoListID(todoListID, out dsReservation, out error);
        }
        #endregion

        #region 会员服务项目管理
        

        public bool InsertCustomerServiceItem(DBEntityCustomerServiceItem csi, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertCustomerServiceItem(csi, out error);
        }

        public bool UpdateCustomerServiceItem(DBEntityCustomerServiceItem csi, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateCustomerServiceItem(csi, out error);
        }

        public bool DeleteCustomerServiceItem(int iCustomerServiceItemID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteCustomerServiceItem(iCustomerServiceItemID, out error);
        }

        public bool QueryCustomerServiceItem(string sFilter, out DataSet ds, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomerServiceItem(sFilter, out ds, out error);
        }

        public bool InsertCustomerServiceItemReservationTime(DBEntityCustomerServiceItemReservationTime detail, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertCustomerServiceItemReservationTime(detail, out error);
        }

        public bool UpdateCustomerServiceItemReservationTime(DBEntityCustomerServiceItemReservationTime detail, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateCustomerServiceItemReservationTime(detail, out error);
        }

        public bool DeleteCustomerServiceItemReservationTime(string sFilter, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteCustomerServiceItemReservationTime(sFilter, out error);
        }

        public bool QueryCustomerServiceItemReservationTime(string sFilter, out DataSet dsDetail, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomerServiceItemReservationTime(sFilter, out dsDetail, out error);
        }

        public bool SubmitCustomerServiceItmeReservationTime(DataSet ds, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.SubmitCustomerServiceItmeReservationTime(ds, out error);
        }

        /// <summary>
        /// 会员服务扣减
        /// </summary>
        /// <param name="customServiceItemID">服务项目ID</param>
        /// <param name="minusRemain">扣减次数</param>
        /// <param name="lastServiceTime">服务时间</param>
        /// <param name="cMemo">说明</param>
        /// <param name="employeeID">员工ID</param>
        /// <returns></returns>
        public bool CompleteCustomServiceItem(int customServiceItemID, int minusRemain, string lastServiceTime,
            string cMemo, string employeeID, DBEntityCustomerServiceItem customerServiceItem, int reservationID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.CompleteCustomServiceItem(customServiceItemID, minusRemain, lastServiceTime, cMemo, employeeID, customerServiceItem, reservationID, out error);
        }
        /// <summary>
        /// 根据用户疗程项目查询消费记录
        /// </summary>
        /// <param name="customServiceItemID"></param>
        /// <returns></returns>
        public bool QueryCustomServiceItemConsume(int customServiceItemID, out DataSet dsServiceItemConsume, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomServiceItemConsume(customServiceItemID, out dsServiceItemConsume, out error);
        }
        /// <summary>
        /// 根据用户预约记录查询扣减次数
        /// </summary>
        /// <param name="customServiceItemID"></param>
        /// <returns></returns>
        public bool QeuryCustomServiceItemConsumeReservationID(int reservationID, out DataSet dsServiceItemConsume, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QeuryCustomServiceItemConsumeReservationID(reservationID, out dsServiceItemConsume, out error);
        }

        /// <summary>
        /// 检车是否能够删除会员服务项目
        /// </summary>
        /// <param name="error"></param>
        /// <returns></returns>
        public bool CheckDeleteCustomServiceItem(int customServiceItemID, out string error){
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.CheckDeleteCustomServiceItem(customServiceItemID, out error);
        }
        #endregion

        #region 会员回访


        public bool InsertCustomerReturnVisit(DBEntityCustomerReturnVisit visit, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertCustomerReturnVisit(visit, out error);
        }

        public bool UpdateCustomerReturnVisit(DBEntityCustomerReturnVisit visit, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateCustomerReturnVisit(visit, out error);
        }

        public bool DeleteCustomerReturnVisit(int visitID, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteCustomerReturnVisit(visitID, out error);
        }

        public bool QueryCustomerReturnVisit(string sFilter, out DataSet ds, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomerReturnVisit(sFilter, out ds, out error);
        }

        #endregion

        #region 支付方式


        public bool QueryPayType(string sFilter, out DataSet ds, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryPayType(sFilter, out ds, out error);
        }

        public bool InsertPayType(DBEntityPayType entity, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertPayType(entity, out error);
        }

        public bool UpdatePayType(DBEntityPayType entity, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdatePayType(entity, out error);
        }

        public bool DeletePayType(int paytype_id, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeletePayType(paytype_id, out error);
        }

        #endregion

        #region 会员充值信息
        

        public bool QueryCustomerPayment(string sFilter, out DataSet ds, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.QueryCustomerPayment(sFilter, out ds, out error);
        }

        public bool InsertCustomerPayment(DBEntityCustomerPayment entity, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.InsertCustomerPayment(entity, out error);
        }

        public bool UpdateCustomerPayment(DBEntityCustomerPayment entity, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.UpdateCustomerPayment(entity, out error);
        }

        public bool DeleteCustomerPayment(int payment_id, out string error)
        {
            WSBusinessServerProxyImpl imp = new WSBusinessServerProxyImpl();
            return imp.DeleteCustomerPayment(payment_id, out error);
        }

        #endregion

        #region IBusinessService Members


        

        #endregion
    }
}
